<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>个人首页</title>
    <style>
        body {
            background-image: url("img/preview2.jpg");
            font-family: Arial, sans-serif;
            background-color: #f0f0f0;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }
        .container {
            text-align: center;
            border: none;
            padding: 20px;
            max-width: 80%;
            margin-top: 10vh;
            background-color: rgba(255, 255, 255, 0.7); /* 白色背景，透明度为0.7 */
        }
        h1 {
            color: #333;
        }
        a {
            color: #007bff;
            text-decoration: none;
        }
        .btn {
            background-color: #5bdfd4;
            color: #fff;
            border: none;
            padding: 8px 16px;
            cursor: pointer;
            font-size: 24px;
            margin-bottom: 10px;
            text-decoration: none;
            display: inline-block;
        }
        .btn:hover {
            background-color: #b3005f;
        }
        .btn.logout {
            background-color: red;
        }
        .links {
            margin-bottom: 20px;
        }
    </style>
</head>
<body>
<div class="container">
    <h1>个人首页</h1>
    <div class="links">
        <a href="rePassword.jsp" class="btn">修改个人密码</a><br>
        <a href="UserServlet?type=updateInit" class="btn">修改个人信息</a><br>
        <a href="UserServlet?type=getList" class="btn">展示所有用户信息</a>
    </div>
    <a href="#" class="btn logout" onclick="logout()">退出登录</a>
</div>
<script>
    function logout() {
        let flag = confirm("是否确认退出");
        if (flag) {
            location.href = 'UserServlet?type=logout';
        }
    }
</script>
</body>
</html>